<template>
    <div>
        <nav-header>
            <template v-slot:title>推广名片</template>
        </nav-header>

        <div style="text-align: center">
            <img :src="code_url" style="width:50%;" />
            <p></p>
            <p style="color: red;font-size: 22px;">长按保存推广二维码</p>
        </div>
    </div>
</template>
<script>
    import NavHeader from "../Layout/NavHeader";
    import qr from 'qrcode';
    export default {
        components: {NavHeader},
        data() {
            return {
                code_url: '',
            }
        },
        created() {
        },
        mounted() {
            let wx_openid = localStorage.getItem('wx_openid');
            let that = this;
            qr.toDataURL(that.globalData.HOTS + '/invite/' + wx_openid).then(url => {
                that.code_url = url;
            });

        },
        methods: {

        },
    }
</script>
<style scoped>


</style>
